<template>
<h1>日期时间选择器组件</h1>
  <el-date-picker
    type="date"
    v-model="rq"
    format="YYYY年MM月DD日"
    value-format="YYYY-MM-DD"
    @change="console.log(rq)"
  ></el-date-picker>
  <el-date-picker
      type="datetimerange"
      v-model="times"
      format="YYYY年MM月DD日 HH时mm分ss秒"
      value-format="YYYY-MM-DD HH:mm:ss"
      @change="f"
      range-separator="到"
      start-placeholder="开始时间"
      end-placeholder="结束时间"

  ></el-date-picker>
</template>
<script setup>

import {ref} from "vue";

const rq = ref('')
const times = ref([])
const f = ()=>{
  console.log(times.value)
  console.log(times.value[0])
  console.log(times.value[1])
}

</script>


<style scoped>

</style>